package ltesim.editors.initPage.listener;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Label;

/**
 * Listener class for adapting nrbLabel on comboBandwith selection change
 * 
 * @author xirka
 * 
 */
public class ComboBandwithListener implements SelectionListener {
	Combo comboBandwidth;
	Label labelNrb;
	String bandwidthSels[], nrbSels[];

	public ComboBandwithListener(Combo _comboBandwidth, Label _labelNrb,
			String[] _bandwidthSels, String[] _nrbSels) {
		comboBandwidth = _comboBandwidth;
		labelNrb = _labelNrb;
		bandwidthSels = _bandwidthSels;
		nrbSels = _nrbSels;
	}

	@Override
	public void widgetSelected(SelectionEvent e) {
		int selected = comboBandwidth.getSelectionIndex();
		labelNrb.setText(nrbSels[selected]);
	}

	@Override
	public void widgetDefaultSelected(SelectionEvent e) {
		// TODO Auto-generated method stub

	}

}
